import React, { useMemo } from 'react'
import { useDialogInstances } from '@designable/react'
import { Select } from '@formily/antd'

export const HandleDialogSetter: React.FC<any> = (props) => {
  const { getAll } = useDialogInstances()
  const options = useMemo(() => getAll?.() || [], [getAll])
  return <Select {...props} options={options} allowClear />
}
